# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-rarfile
_pyname=rarfile
pkgver=4.0
pkgrel=0
pkgdesc="RAR archive reader"
options="!check" # 3 tests fail
url="https://github.com/markokr/rarfile"
arch="noarch"
license="ISC"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-nose unrar"
source="https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

replaces="py-rarfile" # Backwards compatibility
provides="py-rarfile=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	nosetests-3.7
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="05e15acd749564288d4f069970ac196344c33fd2710e918b84afe4c388aa364a17c63f86577037524336e3a022f6db2c8619f9b526f89e00753a8ab0d89263d4  rarfile-4.0.tar.gz"
